<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>BFC</title>
    <style>
        .d1{
            border:1px solid red;
            overflow: hidden;
        }
        .d2{
            width: 100px;
            height:100px;
            background-color: blue;
            float:left;
        }
        .d3{
            width: 500px;
            height: 300px;
            background-color: yellow;
            /* overflow: hidden; */
            border:1px solid red;
        }
        .d4{
            width: 150px;
            height: 150px;
            background-color: aqua;
            margin-top:50px;
        }
    </style>
</head>
<body>
    <div class="d1">
        <div class="d2"></div>
    </div>
    <div class="d3">
        <div class="d4"></div>
    </div>
</body>
</html>